Answer the question
In order to leave comments, you need to log in
How to transfer user login on SharePoint to another site?
Good evening.
Please let me know if there is any solution.
There is a corporate portal on SharePoint and there is a site on php (also in the corporate network).
On the php site I keep a log of visits, in which, in addition to the standard information, I write data: user ip and PC name. But this information is not enough, it is also necessary to log the user's network login (AD login).
Authentication on both sites is implemented without manually entering a password, using windows authentication.
Exclusively by means of php, as I understand it, the user's login cannot be recognized.
Therefore, I created a small page on SharePoint that generates only one line - the user's login.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ Page Language="C#" %>
<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=34564634564567" %>
<WebPartPages:AllowFraming runat="server" />
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=10" />
<title>Test</title>
</head>
<body>
<asp:LoginName id="LoginName1" runat="server" FormatString ="UserLogin: {0}" /><br/>
</body>
</html>
<iframe src="http://portal.sharepoint.ru/sites/SitePages/user.aspx" id='frame' width='700' height='50' frameborder='0'></iframe>
<?php
$q = 'http://portal.sharepoint.ru/sites/SitePages/user.aspx';
$p = array(
'Host' => 'portal.sharepoint.ru',
'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36',
'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding' => 'gzip, deflate, sdch',
'Accept-Language' => 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
);
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $q);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $p);
$content = curl_exec ($ch);
echo $content;
?>
Answer the question
In order to leave comments, you need to log in
Hello!
When creating a custom post type, you did not specify the taxonomy ownership.
EXAMPLE
To display records and categories by type:
Category 1
- record 1
- record 2
Category 2
- record 3
- record 4
2 loops should be used. - receives categories, the second receives posts to them.
Example - https://gist.github.com/DevinWalker/6fb2783c05b46a...
Exclusively by means of php, as I understand it, the user's login cannot be recognized.Got it wrong: link .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question