/[drupal]/contributions/modules/webserver_auth/webserver_auth.module
ViewVC logotype

Diff of /contributions/modules/webserver_auth/webserver_auth.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.13, Fri Mar 3 05:02:28 2006 UTC revision 1.13.2.3, Fri Mar 3 05:08:12 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: webserver_auth.module,v 1.12 2005/04/29 19:27:31 weitzman Exp $  // $Id: webserver_auth.module,v 1.13.2.2 2006/03/03 05:06:18 weitzman Exp $
3    
4  function webserver_auth_init() {  function webserver_auth_init() {
5    global $user, $account;    global $user, $account;
# Line 23  function webserver_auth_init() { Line 23  function webserver_auth_init() {
23        $user = user_external_load($account->name);        $user = user_external_load($account->name);
24        if (!$user->uid) {        if (!$user->uid) {
25          if (variable_get("user_register", 1) == 1) {          if (variable_get("user_register", 1) == 1) {
26            $user_default = array("name" => $account->name, "pass" => "cyan", "init" => db_escape_string($name), "authname_webserver_auth" => $account->name, "status" => 1, "roles" => array((DRUPAL_AUTHENTICATED_RID));            $user_default = array("name" => $account->name, "pass" => "cyan", "init" => db_escape_string($name), "authname_webserver_auth" => $account->name, "status" => 1, "roles" => array(DRUPAL_AUTHENTICATED_RID));
27            // TODO - the hook_user('register') will fire but only for loaded modules. cold be a problem for sites using page cache and that hook+operation            // TODO - the hook_user('register') will fire but only for loaded modules. cold be a problem for sites using page cache and that hook+operation
28            $user = user_save("", array_merge($user_default, (array)$account));            $user = user_save("", array_merge($user_default, (array)$account));
29            watchdog("user", "new user: $user->name (webserver_auth)", l(t("edit user"), "admin/user/edit/$user->uid"));            watchdog("user", "new user: $user->name (webserver_auth)", l(t("edit user"), "admin/user/edit/$user->uid"));

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.13.2.3

  ViewVC Help
Powered by ViewVC 1.1.2