Skip to content

Commit

Permalink
会員の登録できなくなったバグ修正
Browse files Browse the repository at this point in the history
  • Loading branch information
s-nakajima committed Aug 30, 2016
1 parent 78c092f commit dbe845a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Model/Behavior/AvatarBehavior.php
Expand Up @@ -125,7 +125,7 @@ public function temporaryAvatar(Model $model, $user, $fieldName, $size = null) {
$noimage = User::AVATAR_IMG;
}
if (! class_exists('Imagick') || ! $model->Behaviors->hasMethod('createAvatarAutomatically')) {
return App::pluginPath('Users') . DS . 'webroot' . DS . 'img' . DS . $noimage;
return App::pluginPath('Users') . 'webroot' . DS . 'img' . DS . $noimage;
}

$path = TMP . $fieldName;
Expand Down
29 changes: 19 additions & 10 deletions View/Helper/UserEditFormHelper.php
Expand Up @@ -438,16 +438,25 @@ private function __image($fieldName, $userAttribute, $attributes = array()) {
$output = '';
$userAttributeKey = $userAttribute['UserAttribute']['key'];

if ($this->_View->request->params['plugin'] === 'user_manager' &&
$this->_View->request->params['controller'] === 'user_manager') {
$attributes['url'] = array(
'plugin' => 'user_manager',
'controller' => 'user_manager',
'action' => 'download',
'key' => Hash::get($this->_View->request->data, 'User.id'),
'key2' => $userAttributeKey,
'medium',
);
if ($this->_View->request->params['plugin'] === 'user_manager') {
if ($this->_View->request->params['controller'] === 'user_add') {
$attributes['url'] = array(
'plugin' => 'user_manager',
'controller' => 'user_add',
'action' => 'download',
'key' => $userAttributeKey,
'medium',
);
} else {
$attributes['url'] = array(
'plugin' => 'user_manager',
'controller' => 'user_manager',
'action' => 'download',
'key' => Hash::get($this->_View->request->data, 'User.id'),
'key2' => $userAttributeKey,
'medium',
);
}
} else {
$attributes['url'] = array(
'plugin' => 'users',
Expand Down

0 comments on commit dbe845a

Please sign in to comment.