mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Add configuration to allow an admin to set user default values.
This commit is contained in:
parent
60a52972a6
commit
a733f6d43a
@ -124,6 +124,18 @@ $c->collections_always_exist = false;
|
|||||||
// $c->default_relationships = array();
|
// $c->default_relationships = array();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of fields on the usr record which should be set to specific
|
||||||
|
* values when the users are created.
|
||||||
|
* Default: none
|
||||||
|
*/
|
||||||
|
// $c->template_usr = array( 'active' => true,
|
||||||
|
// 'locale' => 'it_IT',
|
||||||
|
// 'date_format_type' => 'E',
|
||||||
|
// 'email_ok' => date('Y-m-d')
|
||||||
|
// );
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* *
|
* *
|
||||||
* External Authentication Sources *
|
* External Authentication Sources *
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
* @license http://gnu.org/copyleft/gpl.html GNU GPL v2
|
* @license http://gnu.org/copyleft/gpl.html GNU GPL v2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("User.php");
|
require("User.php");
|
||||||
require_once("classBrowser.php");
|
require_once("classBrowser.php");
|
||||||
require_once("auth-functions.php");
|
require_once("auth-functions.php");
|
||||||
|
|
||||||
@ -30,8 +30,14 @@ class RSCDSUser extends User
|
|||||||
* Constructor - nothing fancy as yet.
|
* Constructor - nothing fancy as yet.
|
||||||
*/
|
*/
|
||||||
function RSCDSUser( $id , $prefix = "") {
|
function RSCDSUser( $id , $prefix = "") {
|
||||||
|
global $c;
|
||||||
$this->delete_collection_confirmation_required = null;
|
$this->delete_collection_confirmation_required = null;
|
||||||
parent::User( $id, $prefix );
|
parent::User( $id, $prefix );
|
||||||
|
if ( $this->user_no == 0 && isset($c->template_usr) && is_array($c->template_usr) ) {
|
||||||
|
foreach( $c->template_usr AS $k => $v ) {
|
||||||
|
$this->Set($k,$v);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,6 +84,8 @@ class RSCDSUser extends User
|
|||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render input file to import ics in calendar user
|
* Render input file to import ics in calendar user
|
||||||
*
|
*
|
||||||
@ -100,6 +108,7 @@ class RSCDSUser extends User
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the user's relationships to other users & resources
|
* Render the user's relationships to other users & resources
|
||||||
*
|
*
|
||||||
@ -148,6 +157,7 @@ class RSCDSUser extends User
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the user's relationships to other users & resources
|
* Render the user's relationships to other users & resources
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user