本文整理汇总了PHP中app\models\Client::getValidationRulesEditUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::getValidationRulesEditUser方法的具体用法?PHP Client::getValidationRulesEditUser怎么用?PHP Client::getValidationRulesEditUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Client
的用法示例。
在下文中一共展示了Client::getValidationRulesEditUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postEditUser
public function postEditUser(Request $request, User $user, Client $client, CommonCode $cCode)
{
// $bool_include_password = $cCode->setCheckboxVar($request->include_password);
// $bool_include_email = $cCode->setCheckboxVar($request->include_email);
$validation_rules = $client->getValidationRulesEditUser();
// $validation_messages = $client->getValidationMessagesEditUser();
$this->validate($request, $validation_rules);
$arr_request = $client->getRequestArrayEditUser($request);
$user = $user->find(Auth::user()->id);
// $user = $cCode->getObject($arr_request, $user);
// $user->first_name = $arr_request->first_name;
// $user->last_name = $arr_request->last_name;
// $user->company = $arr_request->company;
// $arr_request = array();
// // transfer to new array, so as not to propagate teh password
// $arr_request['first_name'] = $request->first_name;
// $arr_request['last_name'] = $request->last_name;
// $arr_request['company'] = $request->company;
// $user->email = $arr_request['email'];
// $user->password = $arr_request['password'];
// $user->name = '';
// $user->save();
$client = $user->client;
// $client->cloaked_client_id = $client->getNewCloakedClientId($user->id);
// $client->user_id = $user->id;
$client->first_name = $arr_request['first_name'];
$client->last_name = $arr_request['last_name'];
$client->company = $arr_request['company'];
$client->client_url = $arr_request['client_url'];
$client->save();
// $user_id = $user->id;
$data = $client->getDataArrayPostEditUser($arr_request, $user->id, $this->cloakedClientId, $this->arr_logged_in_user);
return view('client/edit_user_results')->with('data', $data);
}