Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow Updating of Federated User's Passwords #444

Merged
merged 9 commits into from
Feb 26, 2018
4 changes: 3 additions & 1 deletion classes/XDUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,11 @@ public static function getUserByID($uid, &$targetInstance = NULL)

public function setPassword($raw_password)
{
if ($this->getUserType() === FEDERATED_USER_TYPE){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a space between closing parens and left brace.

throw new Exception("Permission Denied. Only local accounts may have their passwords modified.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message does not imply what the condition is checking.

"Federated users are not allow to have their passwords modified."

would probably be better :)

}

return $this->_password = $raw_password;

}//setPassword

// ---------------------------
Expand Down
Loading