Jump to content

nickdavies07

Members
  • Posts

    9
  • Joined

  • Last visited

Reputation

0 Neutral

About nickdavies07

Personal Information

  • Occupation
    Web Developer
  • Location
    Wolverhampton
  1. I've developed a basic web based app that connects to our Active Directory through PHP, using a login system. It authenticates against AD and logs the user into a basic page that echos their username. What I really want instead of echoing their username is to fetch either their AD first name and surname or their Display Name. This is the code that I've got to authenticate against AD. // Initialize session session_start(); function authenticate($user, $password) { // Active Directory server $ldap_host = "..."; // Active Directory DN $ldap_dn = "OU=...,DC=...,DC=..."; // Active Directory user group $ldap_user_group = "..."; // Active Directory manager group $ldap_manager_group = "..."; // Domain, for purposes of constructing $user $ldap_usr_dom = "@..."; // connect to active directory $ldap = ldap_connect($ldap_host); // verify user and password if($bind = @ldap_bind($ldap, $user . $ldap_usr_dom, $password)) { // valid // check presence in groups $filter = "(sAMAccountName=" . $user . ")"; $attr = array("memberof"); $result = ldap_search($ldap, $ldap_dn, $filter, $attr) or exit("Unable to search LDAP server"); $entries = ldap_get_entries($ldap, $result); ldap_unbind($ldap); // check groups foreach($entries[0]['memberof'] as $grps) { // is manager, break loop if (strpos($grps, $ldap_manager_group)) { $access = 2; break; } // is user if (strpos($grps, $ldap_user_group)) $access = 1; } if ($access != 0) { // establish session variables $_SESSION['user'] = $user; $_SESSION['access'] = $access; return true; } else { // user has no rights return false; } } else { // invalid name or password return false; } } ?> Any help would be greatly appreciated! Cheers, Nick
  2. Interesting one here. We're looking to build our own web application via HTML and PHP for a support help desk. Does anyone know whether it'd be at all possible, to when a user logs in to Office 365, use those credentials to log them into our web application? So this way we can track which user it is, without them logging in twice. Any help at all would be appreciated. I've created PHP/MySQL web login systems before but nothing like this where we'd be connecting through another system. Cheers. Nick
  3. Bit hard to tell as the PowerShell box closes after it! Haha. I've managed to get a screen grab of them. I do have EWS API installed as well.
  4. Tried that on a couple of accounts and didn't actually remove the address from the autocomplete bit. Frustrating! :/
  5. Tried that one too, Ben. Script threw a load of errors at me when I ran it. Nick
  6. Those addresses aren't in anyone's contacts lists – I'm guessing it'll be because they've emailed that address before from the old system, and it has saved that address through the email migration? Can't figure out how to get rid of them at all it's baffling me.
  7. Hi all. We've recently moved over to Office 365 from Google Apps. During the process we using the built-in O365 migration tool to batch-migrate all staff emails over to the new system. In O365 we have changed email addresses to [email protected] - previously they were a bit random and didn't follow any format. Now when a user attempts to send an email to someone, their old email address is the one shown in the autofill To: field, so when staff are emailing they are clicking on that one, which is the incorrect email. Obviously then emails are all bouncing back because the old address no longer exists in the new system. Is there ANY way at all to get rid of these addresses. We've tried clearing the auto-complete list but the addresses are still showing. Cheers. Nick
  8. Hi all, We're gradually looking to migrate from Google Apps for Education to Microsoft's Office 365. Google Apps for Education is great in allowing us to limit the features that are accessible to students. However, I'm struggling to see how this can be done in Office 365. Essentially, the first thing we'd like to do is to prevent students from seeing all distribution groups and all staff accounts in the 'People' section on the top menu bar. Obviously we'd still like students to be able to send and receive email to/from staff but we'd rather not let them see their personal profiles. What's the best method (if there is any at all) of restricting student accounts in Office 365? Thanks in advance for the help. Nick
×
×
  • Create New...