Add Domain when importing Google

Issue #164 resolved
Karsten Bandlow created an issue

If a new user logins with Google Credentials piler creates automatic an account but not the required domain. In the most cases this would be googlemail.com or for newer accounts gmail.com If you use an google-app account you user your own domain. So please add the user and the domainpart of the mailaddress.

Comments (4)

  1. Janos SUTO repo owner

    I can't reproduce it. I also have an account aaa@aaa.fu, and its domain is aaa.fu in the user table.

    In model/user/google.php there's

    $d = explode('@', $google_account['email']);

    and

    $user['domain'] = $d[1];

    which should provide the proper value for the domain column.

  2. Karsten Bandlow reporter

    To reproduce: 1. New google user login with google_credentials (google link). 2. Login as admin go to users. Try to change password. Doesnt work, because domain of user is unknown. 3. Add domain in admin panel. 4. Change password 5. user can login with google or with piler database credentials

  3. Janos SUTO repo owner

    Thanks, now I get it, and have fixed it. Please update model/user/google.php and controller/login/google.php

  4. Log in to comment