本文整理汇总了PHP中USER::set_password方法的典型用法代码示例。如果您正苦于以下问题:PHP USER::set_password方法的具体用法?PHP USER::set_password怎么用?PHP USER::set_password使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类USER
的用法示例。
在下文中一共展示了USER::set_password方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _store_to_object
/**
* Store the form's values to this user.
* @param USER $obj
* @access private
*/
protected function _store_to_object($obj)
{
if (!$obj->exists()) {
$obj->set_password($this->value_as_text('password1'));
}
if ($this->visible('title')) {
$obj->title = $this->value_as_text('title');
}
$obj->real_first_name = $this->value_as_text('real_first_name');
$obj->real_last_name = $this->value_as_text('real_last_name');
$obj->email = $this->value_as_text('email');
$obj->home_page_url = $this->value_as_text('home_page_url');
$obj->picture_url = $this->value_as_text('picture_url');
$obj->icon_url = $this->value_as_text('icon_url');
$obj->description = $this->value_as_text('description');
$obj->signature = $this->value_as_text('signature');
$obj->email_visibility = $this->value_for('email_visibility');
}
示例2: commit
/**
* Store the form's values as this user's password.
* @param USER $obj
* @access private
*/
public function commit($obj)
{
$history_item = $obj->new_history_item();
$obj->set_password($this->value_as_text('password1'));
$obj->store_if_different($history_item);
$obj->load_permissions();
if ($this->login->equals($obj)) {
$this->app->log_in($obj, $this->value_for('remember'));
}
}