|
|
|
@ -75,6 +75,7 @@ function authentication_has_role($role) {
|
|
|
|
* Note, user < admin < global-admin
|
|
|
|
* Note, user < admin < global-admin
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function authentication_require_role($role) {
|
|
|
|
function authentication_require_role($role) {
|
|
|
|
|
|
|
|
global $CONF;
|
|
|
|
// redirect to appropriate page?
|
|
|
|
// redirect to appropriate page?
|
|
|
|
if(authentication_has_role($role)) {
|
|
|
|
if(authentication_has_role($role)) {
|
|
|
|
return True;
|
|
|
|
return True;
|
|
|
|
@ -215,6 +216,7 @@ function check_email ($email)
|
|
|
|
if (checkdnsrr($domain,'A')) return true;
|
|
|
|
if (checkdnsrr($domain,'A')) return true;
|
|
|
|
if (checkdnsrr($domain,'MX')) return true;
|
|
|
|
if (checkdnsrr($domain,'MX')) return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: different error message for non-existing domains (instead of "email is invalid")
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|