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

Cannot Decline Member #755

Closed
AJAyers1 opened this issue Feb 24, 2015 · 2 comments
Closed

Cannot Decline Member #755

AJAyers1 opened this issue Feb 24, 2015 · 2 comments

Comments

@AJAyers1
Copy link

PHP notice

Trying to get property of non-object

/home/admin/web/platinumserverteam.com/public_html/workgroup/protected/modules_core/user/models/ProfileFieldTypeText.php(178)

166 $errorMsg = $this->regexpErrorMessage;
167 if ($errorMsg == "") {
168 $errorMsg = "Invalid!";
169 }
170 $rules[] = array($this->profileField->internal_name, 'match', 'pattern' => $this->regexp, 'message' => $errorMsg);
171 }
172
173 return parent::getFieldRules($rules);
174 }
175
176 public function getUserValue($user, $raw = true) {
177 $internalName = $this->profileField->internal_name;
178 $value = $user->profile->$internalName;
179
180 if (!$raw && $this->validator == self::VALIDATOR_EMAIL) {
181 return HHtml::link($value, $value);
182 } elseif (!$raw && $this->validator == self::VALIDATOR_URL) {
183 return HHtml::link($value, $value, array('target'=> '_blank'));
184 }
185
186 return $value;
187 }
188
189 }
190
Stack Trace
#0

– /home/admin/web/platinumserverteam.com/public_html/workgroup/protected/modules_core/user/models/ProfileField.php(331): ProfileFieldTypeText->getUserValue(null, true)
326 *
327 * @return type
328 /
329 public function getUserValue($user, $raw = true)
330 {
331 return $this->fieldType->getUserValue($user, $raw);
332 }
333
334 /
*
335 * Returns the translation category
336 * Defaults to: models_Profile
#1

– /home/admin/web/platinumserverteam.com/public_html/workgroup/protected/modules_core/user/models/Profile.php(243): ProfileField->getUserValue(null)
238 $criteria->condition .= "visible = 1";
239 $criteria->order = "sort_order";
240
241 foreach (ProfileField::model()->findAll($criteria) as $field) {
242
243 if ($field->getUserValue($this->user) != "") {
244 $fields[] = $field;
245 }
246 }
247
248 return $fields;
#2

– /home/admin/web/platinumserverteam.com/public_html/workgroup/protected/modules_core/user/models/User.php(562): Profile->getProfileFields()
557 );
558
559 $profile = $this->getProfile();
560
561 if (!$profile->isNewRecord) {
562 foreach ($profile->getProfileFields() as $profileField) {
563 $attributes['profile_' . $profileField->internal_name] = $profileField->getUserValue($this, true);
564 }
565 }
566
567 return $attributes;
#3

@luroc
Copy link

luroc commented Mar 2, 2015

Same here.
The User gets the decline message, but I get the same Error.
When i go to Administration Menu> Users> Edit(of the User I delined) and change 'Status' to 'Enabled', I can delete the Account.

@luke-
Copy link
Contributor

luke- commented Mar 26, 2015

Fixed in upcoming 0.11

@luke- luke- closed this as completed Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants